import request from "@/utils/request";
import { FORM } from "@/config/baseUrl";

// 任务模板列表查询
export function getTaskConfigList(data) {
  return request({
    url: FORM + "/task/taskConfig/list",
    method: "post",
    data,
  });
}

// 保存任务
export function saveTaskConfig(data) {
  return request({
    url: FORM + "/task/taskConfig/addOrUpdate",
    method: "post",
    data,
  });
}

// 任务详情
export function getTaskConfigDetail(id) {
  return request({
    url: FORM + "/task/taskConfig/detail",
    method: "get",
    params: {
      id
    },
  });
}

// 删除任务
export function deleteTaskConfig(ids) {
  return request({
    url: FORM + "/task/taskConfig/deleteByIds",
    method: "post",
    params: {
      ids
    },
  });
}

// 导出任务配置
export function exportTaskConfig(data) {
  return request({
    url: FORM + "/task/taskConfig/export",
    method: "post",
    data,
    responseType: "blob",
  });
}